class MainWindowMessages:
    """主窗口消息常量"""
    # 菜单常量
    RVC = "实时视频"
    LOG = "检测日志"
    TEAM = "开发团队"
    ABOUT = "关于项目"
    # 日志消息常量
    CAMERA_STARTED = "摄像头已启动"
    CAMERA_INIT = "正在初始化摄像头"
    DETECTION_STOPPED = "检测已停止"
    CAMERA_CLOSED = "摄像头已安全关闭"
    MODEL_INIT_FAIL = "模型初始化失败"
    CAMERA_HARDWARE_ERROR = "硬件错误"
    CAMERA_START_FAIL = "摄像头启动失败"
    FRAME_QUEUE_ERROR = "帧队列错误: {}"
    ANOMALY_WARNING = "异常检测报告: {}"
    CAMERA_NOT_RUNNING = "请先启动摄像头"
    MODEL_LOAD_ERROR = "模型加载失败: {}"
    DISPLAY_UPDATE_ERROR = "显示更新失败: {}"
    DETECTION_THREAD_ERROR = "检测线程异常: {}"

class CameraMessages:
    """摄像头控制器消息常量"""
    CAMERA_STOPPING = "正在停止摄像头"
    CAMERA_INACTIVE = "采集线程已退出"
    CAMERA_OPEN_FAIL = "摄像头打开失败"
    FRAME_PROCESS_ERROR = "帧处理异常: {}"
    CAMERA_ALREADY_RUNNING = "摄像头已打开"
    CAMERA_RECONNECT_FAIL = "摄像头重连失败"
    CAPTURE_THREAD_ERROR = "采集线程异常: {}"
    FAIL_SCREENSHOT = "截图失败，错误信息: {}"
    CAMERA_RECONNECTING = "摄像头重连尝试：{}次"
    SUCCESS_SCREENSHOT = "截图成功，保存路径: {}"
    FRAME_READ_FAIL = "帧读取失败，尝试重新初始化"
    CAPTURE_THREAD_STARTED = "摄像头采集线程已启动"
    CAMERA_ACTUAL_RESOLUTION = "摄像头实际分辨率: {}x{}"
    CAMERA_REQUEST_RESOLUTION = "摄像头请求分辨率: {}x{}"
    THREAD_FORCE_TERMINATE = "采集线程未正常退出，强制终止"



class YOLOMessages:
    """YOLO控制器消息常量"""
    DETECTION_ERROR = "检测异常: {}"
    MODEL_RELEASED = "模型资源已释放"
    RELEASE_FAIL = "资源释放失败: {}"
    MODEL_LOADING = "正在加载模型: {}"
    PERSISTENT_ANOMALY = "持续异常报警"
    DETECTION_ENABLED = "异常检测已启用"
    CUDA_DETECTED = "检测到CUDA设备: {}"
    DETECTION_DISABLED = "异常检测已停用"
    MODEL_INIT_FAIL = "模型初始化失败: {}"
    MODEL_CLASS_NOT_MATCH = "模型类别不匹配"
    MODEL_LOADED = "模型加载成功,输入尺寸: {}"
    MODEL_FILE_NOT_FOUND = "模型文件 {} 不存在"
    MODEL_CLASS_MISMATCH = "模型缺失定义类别: {}"
    MODEL_LOADED_Fail = "模型加载失败，请检查模型文件"
    CUDA_NOT_DETECTED = "未检测到CUDA设备，使用CPU模式"



class StatusMessages:
    """状态栏消息常量"""
    READY = "就绪"
    CAMERA_ERROR = "硬件错误"
    SYSTEM_ERROR = "系统异常"
    UNKNOWN_STATUS = "未知状态"
    DETECTION_IDLE = "检测器待机"
    CAMERA_INIT = "摄像头初始化中"
    CAMERA_ACTIVE = "摄像头运行中"
    DETECTION_ERROR = "检测器异常"
    ANOMALY_FOUND = "检测到插入异常"
    DETECTION_STOPPED = "检测已停止"
    ANOMALY_PERSISTENT = "持续异常警告"
    DETECTION_ACTIVE = "YOLO模型已激活"
    CAMERA_DISCONNECTED = "设备断开连接"
    CAMERA_RESOLUTION_CHANGE = "分辨率调整中"

    
    

    
    